package com.fujitsu.cn.fnst.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.cn.fnst.dao.UserDao;
import com.fujitsu.cn.fnst.entiy.User;

@Transactional
@Service
public class UserService implements BaseService<User> {
    @Resource
    private UserDao usersDao;

    @Override
    public User find(int id) {
        return usersDao.query(User.class, id);
    }

    @Override
    public User modify(User t) {
        return usersDao.update(t);
    }

    @Override
    public void delete(User t) {
        usersDao.delete(t);
    }

    @Override
    public User add(User t) {
        return usersDao.insert(t);
    }

    @Override
    public List<User> find(String queryString) {
        return usersDao.query(queryString);
    }

    public User findUser(String userId) {
        return usersDao.findUser(userId);

    }

}
